package com.p2p.auth.domain.entity;

import com.p2p.auth.common.enums.ChannelType;
import lombok.Data;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.*;

/**
 * Created by Antinomy on 16/10/13.
 */
@Entity
@Table(name = "t_visitor")
@DynamicInsert
@DynamicUpdate
@EntityListeners(AuditingEntityListener.class)
@Data
public class Visitor extends IdEntity {
    /**
     *
     */
    private static final long serialVersionUID = -3258839839160856613L;

    /**
     * 访客ID
     */
    @Column(columnDefinition = "varchar(50) NOT NULL comment '用户ID'")
    private String userId;

    /**
     * 访客手机号
     */
    @Column(columnDefinition = "varchar(50) NOT NULL comment '用户ID'")
    private String visitorPhoneNum;

    /**
     * 访客名称
     */
    @Column(columnDefinition = "varchar(50) comment '用户ID'")
    private String visitorRealName;

    /**
     * 访客职务title
     */
    @Column(columnDefinition = "varchar(50) comment '用户ID'")
    private String jobTitle;

    /**
     * 访客是否在职
     */
    @Column(columnDefinition = "int(10)  comment '是否在职'")
    private Integer onType;

    /**
     * 后台登陆密码
     */
    @Column(columnDefinition = "varchar(50) comment '后台登陆密码'")
    private String  password;

//    /**
//     * p2p商家渠道id
//     */
//    @Column(columnDefinition = "varchar(1000) comment 'p2p商家渠道id' ")
//    private String p2pCompanyIds;
//
//    /**
//     * 电商渠道id
//     */
//    @Column(columnDefinition = "varchar(1000) comment '电商渠道id'")
//    private String retailerIds;


    /**
     * p2p商家渠道id
     */
    @Column(columnDefinition = "varchar(1000) comment '渠道类型' ")
    private ChannelType channelType;

    /**
     * 电商渠道id
     */
    @Column(columnDefinition = "varchar(1000) comment '渠道ids'")
    private String channelIds;

    /**
     * 访客是否在职
     */
    @Column(columnDefinition = "varchar(100)  comment '角色id'")
    private String roleId;

    /**
     * 备注
     */
    @Column(columnDefinition = "varchar(1000) comment '电商渠道id'")
    public String remark;
}
